package ${packageName}.vo.request;

import ${packageName}.model.${entityName};
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.jpa.domain.Specification;

import javax.persistence.criteria.Predicate;
import java.util.ArrayList;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ${entityName}VoRequest extends BaseRequest {
private Long ${entityName?uncap_first}Id;
@Override
public Specification<${entityName}> toSpecification() {
return ((root, query, cb) -> {
List
<Predicate> predicates = new ArrayList<>();
    if (predicates.isEmpty()) {
    return cb.conjunction();
    } else {
    return cb.and(predicates.toArray(new Predicate[predicates.size()]));
    }
    });
    }
    }
